<script TYPE="text/javascript">
<!--
// copyright 1999 Idocs, Inc. http://www.idocs.com
// Distribute this script freely but keep this notice in place
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}

//-->
</script>
<form id="settings" action="downloads.py" method="get" class="smalltext">
	<input style="display: none;" type="text" name="category" value="{{ category.name }}" />
	<input style="display: none;" type="text" name="view" value="{{ current.view }}" />
	<span style="{% ifnotequal site.page "rows" %}display: none;{% endifnotequal %}">
	<div class="settings_text">ROWS</div>:  <input class="smalltext" type="text" onkeypress="return numbersonly(this, event)" name="rows_rows" value="{{ current.rows_rows }}" size="3" />
	</span>
	<span style="{% ifnotequal site.page "grid" %}display: none;{% endifnotequal %}">
	<div class="settings_text">ROWS</div>: 
	<input class="smalltext" type="text" onkeypress="return numbersonly(this, event)" name="grid_rows" value="{{ current.grid_dimensions.0 }}" size="3" />
	 <div class="settings_text">COLUMNS</div>: 
	<input class="smalltext" type="text" onkeypress="return numbersonly(this, event)" name="grid_cols" value="{{ current.grid_dimensions.1 }}" size="3" />
	</span>
	<span style="{% ifnotequal site.page "home" %}display: none;{% endifnotequal %}">
	<div class="settings_text">ROWS</div>:  
	<input class="smalltext" type="text" onkeypress="return numbersonly(this, event)" name="hp_rows" value="{{ current.hp_dimensions.0 }}" size="3" />
	 <div class="settings_text">COLUMNS</div>: 
	<input class="smalltext" type="text" onkeypress="return numbersonly(this, event)" name="hp_cols" value="{{ current.hp_dimensions.1 }}" size="3" />
	</span>
	<input class="smalltext" type="submit" value="Go" />
</form>
<script type="text/javascript">
<!--
// Remove None from input text boxes
// Array of input objects
input_objects = document.getElementById('settings').getElementsByTagName('input')
for (x in input_objects) {
if (input_objects[x].value == "None") {
input_objects[x].value = ""
}
}
//-->
</script>